{% extends "base.html" %}

{% block head-title %}{{algorithm.algorithm_name}}{% endblock %}

{% block title %}{{algorithm.algorithm_name}}{% endblock %} 

{% block content %}
<script src="/static/js/timeseries/3.js"></script>
<form action="/timeseries/configure_parameters/" method="post" class="uk-form" id="form1"
					onsubmit="return onForm1Submit();">
	{%csrf_token%}
	<input type="hidden" name="instance_id" value="{{algorithm.instance_id}}"/>
	<fieldset>
		<legend>配置参数(3/3)</legend>
			{% ifequal algorithm.algorithm_name "ARIMA模型" %}
				<div class="uk-form-row">
					<div class="uk-form-controls">
						p值:<input type="number" value="" name="p" placeholder="放空系统将自动计算"/>
					</div>
				</div>
				<div class="uk-form-row">
					<div class="uk-form-controls">
						q值:<input type="number" value="" name="q" placeholder="放空系统将自动计算" />
					</div>
				</div>
			{% endifequal %}
			<div class="uk-form-row">
				<div class="uk-form-controls">
					差分阶数:<input type="number" value="0" name="diff_degrees" />
				</div>
			</div>
			<div class="uk-form-row">
				<div class="uk-form-controls">
					预测周期数:<input type="number" value="3" name="forcast_period_cnt" />
				</div>
			</div>
	</fieldset>
	
	<div class="uk-form-row" style="margin-top:5px;">
		<a href="javascript:history.go(-1);" class="uk-button">上一步</a>
		<input class="uk-button uk-button-primary" type="submit"
			value="提交" style="float: right;">
	</div>
</form>
<hr />
<div class="uk-alert" data-uk-alert>
    <a href="" class="uk-alert-close uk-close"></a>
    <p>平稳性检测值小于0.05表示数据平稳,白噪声检测值小于0.05表示数据无噪声.</p>
</div>
<table class="uk-table uk-table-condensed uk-table-striped">
	<caption>平稳性及白噪声检测</caption>
	<thead>
		<tr>
			<th>差分阶数</th> 
			<th>平稳性检测值</th>
			<th>白噪声检测值</th>
			<th>时序图</th> 
		</tr>
	</thead>
	<tbody>
		<tr>
			<td>0</td>
			<td>{{ algorithm.adf_check_result.0.1 | floatformat:4 }}</td>
			<td>{{ algorithm.wn_check_result.0.1.0 | floatformat:4 }}</td>
			<td>
				<a href="/static/{{algorithm.instance_id}}/chart/ts_0.png" target="_blank" title="点击查看大图">
					<img src="/static/{{algorithm.instance_id}}/chart/ts_0.png" style="width:300px;">
				</a>
			</td>
		</tr>
		<tr>
			<td>1</td>
			<td>{{ algorithm.adf_check_result.1.1 | floatformat:4 }}</td>
			<td>{{ algorithm.wn_check_result.1.1.0 | floatformat:4 }}</td>
			<td>
				<a href="/static/{{algorithm.instance_id}}/chart/ts_1.png" target="_blank" title="点击查看大图">
					<img src="/static/{{algorithm.instance_id}}/chart/ts_1.png" style="width:300px;">
				</a>
			</td>
		</tr>
		<tr>
			<td>2</td>
			<td>{{ algorithm.adf_check_result.2.1 | floatformat:4 }}</td>
			<td>{{ algorithm.wn_check_result.2.1.0 | floatformat:4 }}</td>
			<td>
				<a href="/static/{{algorithm.instance_id}}/chart/ts_2.png" target="_blank" title="点击查看大图">
					<img src="/static/{{algorithm.instance_id}}/chart/ts_2.png" style="width:300px;">
				</a>
			</td>
		</tr>
		<tr>
			<td>3</td>
			<td>{{ algorithm.adf_check_result.3.1 | floatformat:4 }}</td>
			<td>{{ algorithm.wn_check_result.3.1.0 | floatformat:4 }}</td>
			<td>
				<a href="/static/{{algorithm.instance_id}}/chart/ts_3.png" target="_blank" title="点击查看大图">
					<img src="/static/{{algorithm.instance_id}}/chart/ts_3.png" style="width:300px;">
				</a>
			</td>
		</tr>
	</tbody>
</table>
{% endblock %}